package com.ssy.lingxi.after.sale.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 售后评价表
 * @author 伍将
 * @date 2020/9/1
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "as_evaluate",
        indexes = {@Index(name = "as_evaluate_after_sale_id_idx", columnList = "afterSaleId"),
                @Index(name = "as_evaluate_after_sale_type_idx", columnList = "afterSaleType")})
public class EvaluateDO implements Serializable {
    private static final long serialVersionUID = 3730355741926637985L;

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "evaluate_seq")
    @SequenceGenerator(sequenceName = "as_evaluate_seq", name = "evaluate_seq", allocationSize = 1)
    private Long id;

    /**
     * 售后id
     */
    @Column(columnDefinition = "int8")
    private Long afterSaleId;

    /**
     * 售后类型 1-换货 2-退货 3-维修
     * AfterSaleTypeEnum
     */
    @Column(columnDefinition = "int")
    private Integer afterSaleType;

    /**
     * 售后等级（5个级别）
     */
    @Column(columnDefinition = "int")
    private Integer level;

    /**
     * 评价内容
     */
    @Column(columnDefinition = "varchar(120)")
    private String content;

    /**
     * 评价时间
     */
    @Column(columnDefinition = "int8")
    private Long evaluateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAfterSaleId() {
        return afterSaleId;
    }

    public void setAfterSaleId(Long afterSaleId) {
        this.afterSaleId = afterSaleId;
    }

    public Integer getAfterSaleType() {
        return afterSaleType;
    }

    public void setAfterSaleType(Integer afterSaleType) {
        this.afterSaleType = afterSaleType;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getEvaluateTime() {
        return evaluateTime;
    }

    public void setEvaluateTime(Long evaluateTime) {
        this.evaluateTime = evaluateTime;
    }
}
